//
//  CPHomeViewModel.swift
//  cockpit
//
//  Created by Haijun Si on 2020/7/9.
//  Copyright © 2020 chenganrt. All rights reserved.
//

import UIKit
import CocoaLumberjack
import RxSwift
import RxCocoa
import NSObject_Rx
import RxOptional
import RxDataSources

class CPHomeViewModel: CPBaseViewModel, CPViewModelType{
    typealias Input = CPInput
    
    typealias Output = CPOutput
    
    struct CPInput {
        
    }
    
    struct CPOutput {
        let moreTypeArr = BehaviorRelay<[CPHomeMoreTypeModel]?>(value: [CPHomeMoreTypeModel.init(btnName: "更多", btnImg: HOME_BTN_IMAGE, btnType: "moreBtn")])
        
        let dataSource = BehaviorRelay<[CPHomeNewMessageModel]?>(value: [CPHomeNewMessageModel.init(titleStr: "项目标题", timeStr: "2020-7-20", msgId: "10", linkUrl: "www.baidu.com", remark: "备注")])
        
        let banners = BehaviorRelay<[CPHomeCycleModel]?>(value: [CPHomeCycleModel.init(title: "轮播图", imgUrl: bannerUrl, linkUrl: "www.baidu.com", imgId: "10", type: "1", time: "2020-7-20", remark: "轮播图")])
        
    }
    
    func transform(input: Input) -> Output {
        let outPut = Output()
        
//        let arr = outPut.dataSource.value
//        outPut.dataSource.accept(arr)
        
        return outPut
    }
    
    override func destory() {
        DDLogInfo("释放=》")
    }
}
